<?php 
require_once('nav.php');
$id = $_GET['id'];  
$sql = "select * from videos where vid={$id}";
$result = mysql_query($sql) or die('查询失败！'.mysql_error());   
$row = mysql_fetch_assoc($result);
?>
<div class="col-sm-9 col-md-10">
   <h2 class="text-center">视频修改</h2>
   <form method="post"  action="videoUpdate.php" enctype="multipart/form-data">
   <input type="hidden" name="id" value="<?php echo $id;?>">

   <div class="form-group">
        <label for="videoname" class="col-md-2 col-xs-3 control-label">视频名称</label>
        <div class="col-md-10 col-xs-9">
          <input type="text" class="form-control" id="videoname" name="videoname" 
          value="<?php echo $row['videoname'];?>">
        </div>
  </div>

  <div class="form-group">
        <label for="tid" class="col-md-2 col-xs-3 control-label">视频类别</label>
        <div class="col-md-10 col-xs-9">
          <input type="text" class="form-control" id="tid" name="tid" 
          value="<?php echo $row['tid'];?>">
        </div>
  </div>

  <div class="form-group">
        <label for="pic" class="col-md-2 col-xs-3 control-label">海报</label>
        <div class="col-md-10 col-xs-9">
          <input type="file" class="form-control" id="pic" name="pic" 
          value="<?php echo $row['pic'];?>">
        </div>
  </div>

  <div class="form-group">
        <label for="intro" class="col-md-2 col-xs-3 control-label">内容简介</label>
        <div class="col-md-10 col-xs-9">
          <input type="text" class="form-control" id="intro" name="intro" 
          value="<?php echo $row['intro'];?>">
        </div>
  </div>

  <div class="form-group">
        <label for="uploaddate" class="col-md-2 col-xs-3 control-label">上传日期</label>
        <div class="col-md-10 col-xs-9">
          <input type="date" class="form-control" id="uploaddate" name="uploaddate" 
          value="<?php echo $row['uploaddate'];?>">
        </div>
  </div>

  <div class="form-group">
        <label for="uploadadmin" class="col-md-2 col-xs-3 control-label">上传用户</label>
        <div class="col-md-10 col-xs-9">
          <input type="text" class="form-control" id="uploadadmin" name="uploadadmin" 
          value="<?php echo $row['uploadadmin'];?>">
        </div>
  </div>

  <div class="form-group">
        <label for="hittimes" class="col-md-2 col-xs-3 control-label">点击率</label>
        <div class="col-md-10 col-xs-9">
          <input type="text" class="form-control" id="hittimes" name="hittimes" 
          value="<?php echo $row['hittimes'];?>">
        </div>
  </div>

  <div class="form-group">
        <label for="downtimes" class="col-md-2 col-xs-3 control-label">下载量</label>
        <div class="col-md-10 col-xs-9">
          <input type="text" class="form-control" id="downtimes" name="downtimes" 
          value="<?php echo $row['downtimes'];?>">
        </div>
  </div>

  <div class="form-group">
        <label for="address" class="col-md-2 col-xs-3 control-label">下载地址</label>
        <div class="col-md-10 col-xs-9">
          <input type="text" class="form-control" id="address" name="address" 
          value="<?php echo $row['address'];?>">
        </div>
  </div>

  <div class="form-group">
    <label class="col-xs-3"></label>
    <div class="col-md-10 col-xs-9 col-md-offset-2 col-xs-offset-3">
      <input type="submit" value="更新">
      <input type="reset" value="重置">
    </div>
  </div>


<?php 
require_once('footer.php'); 
?>





<!-- <tr>
  <td width="20%">id</td>
  <td width="80%"><?php  echo $row['vid'];  ?>
  <input type="hidden" name="id" value=<?php  echo $row['vid'];  ?>>  
  </td>
</tr>
<tr>
  <td>视频名称：</td>
  <td><input type="text" name="videoname" size=30  value=<?php  echo $row['videoname'];  ?>></td>
</tr>
<tr>
  <td>视频类别：</td>
  <td><input type="text" name="tid" size=30  value=<?php  echo $row['tid'];  ?>></td>
</tr>
<tr>
  <td>海报：</td>
  <td><input type="file" name="pic" size=30  value=<?php  echo $row['pic'];  ?>></td>
</tr>
<tr>
  <td>内容简介：</td>
  <td><input type="text" name="intro" size=30  value=<?php  echo $row['intro'];  ?>></td>
</tr>
<tr>
  <td>添加日期：</td>
  <td><input type="date" name="uploaddate" size=30  value=<?php  echo $row['uploaddate'];  ?>></td>
</tr>
<tr>
  <td>上传用户：</td>
  <td><input type="text" name="uploadadmin" size=30  value=<?php  echo $row['uploadadmin'];  ?>></td>
</tr>
<tr>
  <td>点击率：</td>
  <td><input type="text" name="hittimes" size=30  value=<?php  echo $row['hittimes'];  ?>></td>
</tr>
<tr>
  <td>下载量：</td>
  <td><input type="text" name="downtimes" size=30  value=<?php  echo $row['downtimes'];  ?>></td>
</tr>
<tr>
  <td>下载地址：</td>
  <td><input type="text" name="address" size=30  value=<?php  echo $row['address'];  ?>></td>
</tr>
<tr>
<td width=150></td>
<td>
<input type="submit" value="更新">
<input type="reset" value="重置">
</td>
</tr>
</table>
</form>
 </body>
</html> -->